This application claims the benefit of Korean Application Nos. 98-55499, filed Dec. 16, 1998, and 99-839, filed Jan. 14, 1999, in the Korean Patent Office, the disclosures of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates to fast searching of digital data, and more particularly, to a method of generating additional information used to quickly search for a desired position in a data stream, after storing data which is packetized (hereinafter, called xe2x80x9cpacket dataxe2x80x9d) in a recording medium, a recording medium for storing the information and a recording and/or playback apparatus using the same.
2. Description of the Related Art
Recording and/or playback apparatuses which store and/or reproduce packet data, which is used in digital satellite broadcasting or in digital high definition broadcasting, in a one dimensional recording medium such as a tape and which implement special playback such as trick-play, have been developed. Moreover, an optical recording and/or playback apparatus or multimedia equipment using optical disks requires the function of recording packet data in a two dimensional recording medium such as an optical disk and quickly accessing a desired position during special playback such as time search to play back only necessary data.
FIG. 1 shows the basic form of recorded data including input packet data and its arrival time and the conceptional relation between the recorded data and data output time intervals during playback. When recording input data, an arrival time stamp (ATS), which is arrival time information, is added to the input data and the data is output based on the added ATS during playback. Here, the input data is packetized data which is obtained by dividing data such as video or audio into units of a predetermined size. The packetized data is transmitted through satellites, cables or local area networks (LANs). The size of the unit is 188 bytes when data is transmitted using a Moving Picture Experts Group (MPEG)-2 transport stream defined by the International Organization for Standardization (ISO)/International Electrotechnical Commission (IEC) 13818-1 standard, and is 53 bytes when data is transmitted using an asynchronous transfer mode (ATM) standard.
In digital broadcasting, packet data is transmitted at irregular time intervals. The transmitted packet data is usually received by a receiving party having a decoder. In the receiving party, the transmitted data is input into the decoder via a buffer and decoded by the decoder so that users can watch the broadcasting.
When a user sets a playback mode to reproduce, at a desired time, packet data, which has been stored in a recording medium, is sent to the decoder by a playback apparatus. When sending the data to the decoder, the irregular time intervals at which the packet data was originally transmitted to the receiving party are significant because the buffer of the receiving party overflows or underflows if the irregular time intervals are not obeyed. This is because, when transmitting data, an original transmitting party (a broadcasting station) adjusts the time intervals between packet data taking into account the state of the buffer of a receiving party having a decoder. For this reason, it is assumed that information on the arrival time of each packet of data is added to each corresponding packet of input data when a recording apparatus records data, and each packet of data is output by a playback apparatus based on the arrival time information thereof.
FIG. 2 is a block diagram showing a recording and playback apparatus for the packet data shown in FIG. 1. In FIG. 2, a counter 102, which operates according to a system clock signal, usually uses a system clock signal of 27 MHz because the MPEG-2 system generates time stamps on the basis of a clock signal of 27 MHz. It is needless to say that a system clock signal of another frequency can be used.
An ATS generator 104 adds an ATS to each packet of input data. The input packet data together with the added ATSs is converted into a signal suitable for recording by a recording controller 106 and then recorded in a recording medium 108. A playback controller 110 plays back to which ATSs have been added, which is recorded in the recording medium 108 and sends the playback data to an ATS processor 112. The ATS processor 112 outputs the data according to the added ATS of the playback data. Here, the ATS generator 104 and the ATS processor 112 each includes an internal buffer. Alternately, the buffers of the ATS generator 104 and the ATS processor 112 may be separately provided on the outside.
In the method of adding an ATS, during recording, the ATS generator 104 reads a count value of the counter 102 at the time when packet data is input, and adds the count value to the packet as an ATS. The packet data with the added ATS is temporarily stored in the internal buffer of the ATS generator 104 and then recorded in the recording medium 108 via the recording controller 106. As mentioned above, the internal buffer can be separately provided on the outside of the ATS generator.
During playback, the playback controller 110 plays back the packet data with the added ATS from the recording medium 108 and sends the playback data to the ATS processor 112. The ATS processor 112, which includes a buffer of a predetermined size, temporarily stops reading data when the buffer overflows, and restarts the reading when the buffer is empty, repeatedly. The ATS processor 112 reads the ATS and corresponding packet data of a first packet, from its internal buffer, and sets the counter 102 based on the ATS while outputting the packet data. The output data of the ATS processor 112 is pure packet data from which the ATS has been removed. Thereafter, packet data is output only when the added ATS of the packet is determined to have the same value as the count value of the counter 102 by comparing the ATS with the count value. The buffer included in the ATS processor 112 may also be separately provided on the outside. Due to such configuration and operation as described above, data can be transmitted to a receiving party having a decoder while the original time intervals of packet data are maintained during playback so that decoding can be smoothly performed.
In addition to simple playback functions in which recorded data is sequentially played back from beginning to end, special playback functions, which are provided in analog recording and playback apparatuses such as existing video cassette recorders (VCRs) and in digital audio and video (AV) apparatuses which record or play back data in or from two dimensional recording media such as video CD and DVD, must be supported. Accordingly, a fast search function is used in playing back of data starting from an arbitrary position of a data stream. For example, time searching is representatively used to perform playback starting from data corresponding to a desired time or data soon after the desired time, instead of starting from the beginning. In this case a fast search function is desired. In addition, it is necessary to quickly search for desired positions when a user collects data streams from various positions on a recording medium to make a new playback order of the collected data streams and plays back the data streams in the new order.
FIG. 3 is a diagram for explaining a time search in a case where data with an ATS is recorded without a special information structure. Referring to FIG. 3, if it is assumed that a specified target time is ATS1, every ATS is quickly read starting from the beginning of a data stream, and the values of ATSs, which are added to packets, are compared with the value of ATS1 in order to find out the position of data corresponding to the time slot of ATS1. As the result of the comparison, data packets having ATS values smaller than the value of ATS1 are all discarded, and playback is performed starting from the packet data having an ATS value equal to or larger than the value of ATS1. Accordingly, when a special information structure for fast searching is not provided, since every data item must be read and checked from the beginning to find desired data, there is a problem that it takes too much time to search the data.
To solve the above and other problems, it is an object of the present invention to provide a method for generating information for facilitating special playback such as fast searching, after recording digital data having a packet structure which is used in digital satellites, digital terrestrial waves, digital cable broadcasting or asynchronous transfer mode (ATM) transmission networks.
It is another object of the present invention to provide a recording medium for storing information for facilitating the implementation of a special playback function such as time searching, on a recording medium such as an optical disk which allows random access unlike a one dimensional medium such as a tape.
It is still another object of the present invention to provide a recording and/or playback apparatus for recording information for fast searching of a recording medium, quickly searching for a position which a user desires to playback data, using the recorded information for fast searching, and playing back data starting from the corresponding position.
Additional objects and advantages of the invention will be set fourth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Accordingly, to achieve the first object and other objects of the present invention, there is provided a method of generating information for fast searching. The method includes the steps of segmenting a data stream comprising input packet data, into a plurality of basic units, each basic unit having a predetermined size, generating basic unit information related to each of the basic units of the data stream, and generating data stream information including a plurality of the basic unit information, each of the basic unit information of the basic unit having arrival time information of a first packet of data of a corresponding basic unit.
To achieve the second object and other objects of the present invention, there is provided a recording medium including a first area having a data stream which includes packet data of a plurality of basic units of a predetermined size, and a second area having data stream information which includes a plurality of basic unit information of basic units having arrival time information of a first packet of data of corresponding ones of the basic units, wherein a desired position in the data stream of the first area is quickly searched based on the data stream information of the second area.
To achieve the third object and other objects of the present invention, there is provided a recording apparatus including a data stream information generator for segmenting a data stream comprising input packet data into basic units of a predetermined size and generating data stream information having a plurality of basic unit information, each of the basic unit information of the basic unit including arrival time information of a first packet of data of a corresponding one of the basic units; and a recording controller for recording the data stream is recorded in a first area of a recording medium and the data stream information is recorded in a second area of the recording medium.
There is also provided a playback apparatus for playing back data recorded in a recording medium which includes a first area having a data stream which includes packet data and a second area having data stream information which includes a plurality of basic unit information, each of the basic unit information of the basic unit having arrival time information of a first packet of data of a corresponding one of the basic units, the basic unit which is obtained by segmenting the data stream in the first area into units of a predetermined size. The playback apparatus includes a data stream information processor for comparing the arrival time of a target position with arrival time information of each of a first packet of data of corresponding one of the basic units, so as to search the arrival time information corresponding to the arrival time of the target position and for detecting position information of the basic unit corresponding to the searched arrival time information; and a playback controller for playing back data starting from the basic unit in a data stream on the recording medium corresponding to the detected basic unit position information.
In another aspect of the present invention, there is provided a recording and playback apparatus including a data stream information generator for segmenting a data stream comprising input packet data into basic units of a predetermined size and generating data stream information having a plurality of basic unit information, each of the basic unit information of the basic unit including arrival time information of a first packet of data of a corresponding one of the basic units; a recording controller for recording the data stream is recorded in a first area of a recording medium and the data stream information is recorded in a second area of the recording medium; a data stream information processor for comparing the arrival time of a target position with arrival time information of each of a first packet of data of corresponding basic units, so as to search the arrival time information corresponding to the arrival time of the target position and for detecting position information of the basic unit corresponding to the searched arrival time information; and a playback controller for playing back data of the data stream recorded on the recording medium starting from the basic unit corresponding to the detected basic unit position information.